home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / irix / scripts / rcs / Makercsrev < prev    next >
Encoding:
Text File  |  1994-08-02  |  960 b   |  45 lines

  1. #! /bin/csh
  2. #
  3. # Makercsrev    Make a revision of every RCS file.
  4. #
  5. # Synopsis:
  6. #    Makercsrev <rev#>
  7. #
  8. # Description:
  9. #    Loop through every RCS file and force the creation of a new
  10. #    revision.
  11. #
  12. # Parameters:
  13. #    rev#    Revision number to create.
  14. #---------------------------------------------------------------------------
  15.  
  16. set rev = $1
  17.  
  18. set opt = ""
  19. if ( $?RCSOPTS ) then
  20.     set opt = ( $opt $RCSOPTS )
  21. endif
  22. if ( -e ./.rcsopts ) then
  23.     set x = ( `grep "^co[     ]" ./.rcsopts` )
  24.     if ( $#x > 1 ) then
  25.     set opt = ( $opt $x[2-] )
  26.     else
  27.     set x = ( `cat ./.rcsopts` )
  28.     if ( "$x[1]" != "ci" && "$x[1]" != "col" ) then
  29.         echo "*** Old style .rcsopts file ***"
  30.         set opt = ( $opt `cat ./.rcsopts` )
  31.     endif
  32.     endif
  33. endif
  34.  
  35. foreach rcsfile ( `ls RCS/*,v` )
  36.     if ( -d $rcsfile ) continue
  37.     set file = `basename $rcsfile ,v`
  38.     /usr/sbin/co -l $opt $file
  39.     /usr/sbin/ci -f$rev -m"New Revision" $file
  40. end
  41.  
  42. ### Local Variables:
  43. ### auto-fill-hook: nil
  44. ### End:
  45.